package com.ruoyi.workorder.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.workorder.mapper.WorkordersCatalogMapper;
import com.ruoyi.workorder.domain.WorkordersCatalog;
import com.ruoyi.workorder.service.IWorkordersCatalogService;

/**
 * 工单类别Service业务层处理
 * 
 * @author songxin
 * @date 2024-07-09
 */
@Service
public class WorkordersCatalogServiceImpl implements IWorkordersCatalogService 
{
    @Autowired
    private WorkordersCatalogMapper workordersCatalogMapper;

    /**
     * 查询工单类别
     * 
     * @param woCatalogId 工单类别主键
     * @return 工单类别
     */
    @Override
    public WorkordersCatalog selectWorkordersCatalogByWoCatalogId(Long woCatalogId)
    {
        return workordersCatalogMapper.selectWorkordersCatalogByWoCatalogId(woCatalogId);
    }

    /**
     * 查询工单类别列表
     * 
     * @param workordersCatalog 工单类别
     * @return 工单类别
     */
    @Override
    public List<WorkordersCatalog> selectWorkordersCatalogList(WorkordersCatalog workordersCatalog)
    {
        return workordersCatalogMapper.selectWorkordersCatalogList(workordersCatalog);
    }

    /**
     * 新增工单类别
     * 
     * @param workordersCatalog 工单类别
     * @return 结果
     */
    @Override
    public int insertWorkordersCatalog(WorkordersCatalog workordersCatalog)
    {
        return workordersCatalogMapper.insertWorkordersCatalog(workordersCatalog);
    }

    /**
     * 修改工单类别
     * 
     * @param workordersCatalog 工单类别
     * @return 结果
     */
    @Override
    public int updateWorkordersCatalog(WorkordersCatalog workordersCatalog)
    {
        return workordersCatalogMapper.updateWorkordersCatalog(workordersCatalog);
    }

    /**
     * 批量删除工单类别
     * 
     * @param woCatalogIds 需要删除的工单类别主键
     * @return 结果
     */
    @Override
    public int deleteWorkordersCatalogByWoCatalogIds(Long[] woCatalogIds)
    {
        return workordersCatalogMapper.deleteWorkordersCatalogByWoCatalogIds(woCatalogIds);
    }

    /**
     * 删除工单类别信息
     * 
     * @param woCatalogId 工单类别主键
     * @return 结果
     */
    @Override
    public int deleteWorkordersCatalogByWoCatalogId(Long woCatalogId)
    {
        return workordersCatalogMapper.deleteWorkordersCatalogByWoCatalogId(woCatalogId);
    }

    @Override
    public Long getWorkordersCatalogName(WorkordersCatalog workordersCatalog) {
        return workordersCatalogMapper.getWorkordersCatalogName(workordersCatalog);
    }

    @Override
    public List<String> getWorkordersCatalogNameConstraint(Long[] woCatalogId) {
        return workordersCatalogMapper.getWorkordersCatalogNameConstraint(woCatalogId);
    }
}
